include_defs('//ReactAndroid/DEFS')

android_library(
  name = 'bridge',
  srcs = glob(['**/*.java']),
  exported_deps = [
    react_native_dep('java/com/facebook/jni:jni'),
    react_native_dep('java/com/facebook/proguard/annotations:annotations'),
  ],
  proguard_config = 'bridge.pro',
  deps = [
    react_native_dep('java/com/facebook/systrace:systrace'),
    react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
    react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'),
    # TODO mhorowitz:
    #  java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/bridge/
    #  lacks a similar dependency to this.  This means that the
    #  loadLibrary calls in it are not guaranteed to succeed.  This is
    #  kind of a mess for the jni/jni-internal stuff.  In theory, we
    #  should be creating -internal android_library rules, too.  In
    #  practice, since these are resolved at runtime, putting the
    #  dependency in the app works, too.  gross.
    #    '//native/react/jni:jni-internal',
    react_native_dep('third-party/java/infer-annotations:infer-annotations'),
    react_native_dep('third-party/java/jsr-305:jsr-305'),
    react_native_target('java/com/facebook/react/bridge:bridge'),
    react_native_target('java/com/facebook/react/common:common'),
    react_native_target('java/com/facebook/react/devsupport:devsupport'),
    react_native_target('java/com/facebook/react/module/model:model'),
  ],
  visibility = [
    'PUBLIC',
  ],
)

